package com.mkait.thief.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 偷订单表_赚外快

 * @TableName thief
 */
@TableName(value ="thief")
@Data
public class Thief implements Serializable {
    /**
     * 被偷人id
     */
    @TableField(value = "victim_id")
    private Integer victimId;

    /**
     * 被偷商品id
     */
    @TableField(value = "victim_good")
    private Integer victimGood;

    /**
     * 偷单人id
     */
    @TableField(value = "thief_id")
    private Integer thiefId;

    /**
     * 偷单商品id
     */
    @TableField(value = "thief_good")
    private Integer thiefGood;

    /**
     * 偷单几率，默认百分之10
     */
    @TableField(value = "odds")
    private Integer odds;

    /**
     * 备注，写商品名
     */
    @TableField(value = "remark")
    private String remark;

    /**
     * 限制多少元以下的单子可以偷 -1则为不限制
     */
    @TableField(value = "restricted")
    private Integer restricted;

    /**
     * 偷单类型 0-链接 1-游戏CDK 2-账号
     */
    @TableField(value = "type")
    private Integer type;


    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Thief other = (Thief) that;
        return (this.getVictimId() == null ? other.getVictimId() == null : this.getVictimId().equals(other.getVictimId()))
            && (this.getVictimGood() == null ? other.getVictimGood() == null : this.getVictimGood().equals(other.getVictimGood()))
            && (this.getThiefId() == null ? other.getThiefId() == null : this.getThiefId().equals(other.getThiefId()))
            && (this.getThiefGood() == null ? other.getThiefGood() == null : this.getThiefGood().equals(other.getThiefGood()))
            && (this.getOdds() == null ? other.getOdds() == null : this.getOdds().equals(other.getOdds()))
            && (this.getRemark() == null ? other.getRemark() == null : this.getRemark().equals(other.getRemark()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVictimId() == null) ? 0 : getVictimId().hashCode());
        result = prime * result + ((getVictimGood() == null) ? 0 : getVictimGood().hashCode());
        result = prime * result + ((getThiefId() == null) ? 0 : getThiefId().hashCode());
        result = prime * result + ((getThiefGood() == null) ? 0 : getThiefGood().hashCode());
        result = prime * result + ((getOdds() == null) ? 0 : getOdds().hashCode());
        result = prime * result + ((getRemark() == null) ? 0 : getRemark().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", victimId=").append(victimId);
        sb.append(", victimGood=").append(victimGood);
        sb.append(", thiefId=").append(thiefId);
        sb.append(", thiefGood=").append(thiefGood);
        sb.append(", odds=").append(odds);
        sb.append(", remark=").append(remark);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}